home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (Latin America) Volume 1 #6 / CD-ROM Today 6 Latam.iso / referenc / evol / database.dxr / 00097_DoLoad.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.5 KB  |  62 lines

  1. on loadArticle artName, bSupport
  2.   global wColor, gScanCount
  3.   cursor(4)
  4.   set artIndex to BinarySearch(artName)
  5.   if artIndex <= 0 then
  6.     set secondTry to artName
  7.     delete char -30000 of secondTry
  8.     set artIndex to BinarySearch(secondTry)
  9.   end if
  10.   if artIndex > 0 then
  11.     if not bSupport then
  12.       TellMeToLoad(artIndex)
  13.     else
  14.       set wColor to 6
  15.       TellSupportToLoad(artIndex)
  16.     end if
  17.   else
  18.     beep()
  19.   end if
  20.   cursor(-1)
  21.   if artName <> "CONTENTS" then
  22.     set the visible of sprite gCornerCh() to 1
  23.     resetScanTag()
  24.   else
  25.     set the visible of sprite gCornerCh() to 0
  26.     set gScanCount to 32000
  27.   end if
  28. end
  29.  
  30. on TellSupportToLoad artIndex
  31.   global gSupportWinName
  32.   set bOpen to 0
  33.   repeat with WinEntry in the windowList
  34.     set bOpen to bOpen or (the name of WinEntry = gSupportWinName)
  35.   end repeat
  36.   if not bOpen then
  37.     set the windowType of window gSupportWinName to 4
  38.     set the rect of window gSupportWinName to rect(60, 60, 60 + 304, 60 + 261)
  39.     open(window gSupportWinName)
  40.   end if
  41.   set bReady to 0
  42.   repeat while not bReady
  43.     set bReady to getPos(the windowList, window gSupportWinName)
  44.   end repeat
  45.   tell window gSupportWinName
  46.     DisplayNewArticleSUPPORT(artIndex)
  47.   end tell
  48.   UpdateTrace(artIndex)
  49. end
  50.  
  51. on TellMeToLoad artIndex
  52.   global gSourceMem, gAutoBack
  53.   set gAutoBack to EMPTY
  54.   set gSourceMem to artIndex
  55.   UpdateNarraList()
  56.   UpdateTrace(artIndex)
  57.   if gAutoBack <> EMPTY then
  58.     loadArticle(gAutoBack, 1)
  59.     set gAutoBack to EMPTY
  60.   end if
  61. end
  62.